// pages/promise/item/item.js
let app = getApp().globalData
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    items: Object,
    isdelete: Boolean
  },

  /**
   * 组件的初始数据
   */
  data: {
    showWarn: false,
    type: {
      destination:"货品去向",
      count: "分拨数量",
      driver: "运输司机",
      arrivalTime: "到达时间"
    }
  },

  /**
   * 组件的方法列表
   */
  methods: {
    open() {
      app.operation = 2;
      app.promise_data = this.properties.items;
      if(!this.properties.isdelete) {
        wx:wx.navigateTo({
          url: '/pages/transportInformation/product/product',
          events: false,
          success: (result) => {},
          fail: (res) => {},
          complete: (res) => {},
      })
    }
  },

    closeDialog() {
      this.setData({
        showWarn: false
      })
    },
    delete() {
      this.setData({
        showWarn: true
      })
    }
  },
})
